package com.gradle.practice;

import java.util.HashMap;
import java.util.Map;

/**
 * TodoRepository--GradleTest
 *
 * @author: Jovi
 * @createTime: 2018-06-26 11:26
 **/
public class TodoRepository {

    private static Map<String, TodoItem> items = new HashMap();

    public void save(TodoItem item) {

        System.out.println("" + item);
        items.put(item.getName(), item);
    }

    public TodoItem query(String name) {
       return items.get(name);
    }

}
